/*
 * Copyright (C) 2013 Daniel Wasilew <daniel.wasilew@codeminer.org>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.codeminer.parts.player;

import org.codeminer.parts.devices.Device;
import org.codeminer.parts.library.Playlist;
import org.codeminer.parts.library.Song;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

/**
 * User: Daniel Wasilew <daniel.wasilew@codeminer.org>
 * Date: 18.03.13
 * Time: 07:45
 */
public class PlayerInfo {
    private final List<Device> connectedDevices = new LinkedList<>();
    private final String name;
    private final Song currentSong;
    private final Playlist currentPlaylist;
    private final double currentPosition;
    private final PlayerState currentState;

    public PlayerInfo(String name, Song currentSong, Playlist currentPlaylist, double currentPosition, List<Device> connectedDevices, PlayerState currentState) {
        this.name = name;
        this.currentSong = currentSong;
        this.currentPlaylist = currentPlaylist;
        this.currentPosition = currentPosition;
        this.connectedDevices.addAll(connectedDevices);
        this.currentState = currentState;
    }

    public List<Device> getConnectedDevices() {
        return Collections.unmodifiableList(connectedDevices);
    }

    public String getName() {
        return name;
    }

    public Song getCurrentSong() {
        return currentSong;
    }

    public Playlist getCurrentPlaylist() {
        return currentPlaylist;
    }

    public double getCurrentPosition() {
        return currentPosition;
    }

    public PlayerState getCurrentState() {
        return currentState;
    }
}
